#pragma warning(disable : 4996)
#include"SeqList.h"
void SLinit(SeqList* date)
{
	date->capacity = 4;
	date->p = (SLdatetp*)malloc(sizeof(SLdatetp) * date->capacity);
	date->size = 0;
}
void SLdeatroy(SeqList* date)
{
	free(date->p);
	date->p = NULL;
	date->size = 0;
	date->capacity = 0;
}
void SLexpansion(SeqList* date)
{
	SLdatetp* temp = (SLdatetp*)realloc(date->p, sizeof(SLdatetp) * date->capacity * 2);
	if (temp == NULL)
	{
		perror("temp==null");
	}
	date->p = temp;
	date->capacity *= 2;
}
void SLpushback(SeqList* date,SLdatetp x)
{
	if (date->size == date->capacity)
	{
		SLexpansion(date);
	}
	date->p[date->size] = x;
	date->size++;

}
void SLpopback(SeqList* date)
{
	assert(date->size!= 0);

	date->size--;

}